package com.pap.product.calculate.auto.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.pap.base.mapper.PapBaseMapper;
import com.pap.product.calculate.auto.entity.ProductCalculate;;

public interface ProductCalculateMapper extends PapBaseMapper<ProductCalculate> {
	int deleteByPrimaryKey(String id);

	int selectCountByMap(Map<Object, Object> map);

	List<ProductCalculate> selectListByMap(Map<Object, Object> map);

	ProductCalculate selectByPrimaryKeyAndTableName(@Param("id") String id,
			@Param("dynamicTableName") String dynamicTableName);

	int deleteByPrimaryKeyAndTableName(@Param("id") String id, @Param("dynamicTableName") String dynamicTableName);

	int insert(ProductCalculate record);

	int insertSelective(ProductCalculate record);

	ProductCalculate selectByPrimaryKey(String id);

	int updateByPrimaryKeySelective(ProductCalculate record);

	int updateByPrimaryKey(ProductCalculate record);
	
	// alexgaoyh
	
	int deleteByProductId(@Param("productId") String productId);
	
	/**
	 * 查询此产品下面的公式定义，并且根据orderNo 进行排序
	 * @param productId
	 * @return
	 */
	List<ProductCalculate> selectByProdocutIdOrderByOrderNo(@Param("productId") String productId);
}